#pragma once
#include "UIAnimationBase.h"

namespace DirectUI
{
	namespace UIAnimation
	{
		class CUIDoubleAnimation
			: public CUIAnimationBase<CUITimeline<IUIDoubleAnimation, CUIDoubleAnimation, IUIDoubleAnimation>, CUIDoubleAnimation>
		{
		public:
			DECLARE_CLASS(CUIDoubleAnimation, DoubleAnimation)

		public:
			CUIDoubleAnimation();
			virtual ~CUIDoubleAnimation();

		public:
			virtual void	OnTaskInit(CUIAnimationTimerData* pData);
			virtual BOOL	DoTimerTask();
			virtual void	ChangeDoubleProperty(double value);

			virtual bool	CheckValid();
			virtual void	OnComplete();
			virtual void	OnParseAttribute(xml_attribute& attr, LPCTSTR lpAttrAlias);

		private:
			CUIAnimationTimerData* m_pTimerTaskData;
		};

		//////////////////////////////////////////////////////////////////////////
		class CUIColorAnimation
			: public CUIAnimationBase<CUITimeline<IUIColorAnimation, CUIColorAnimation, IUIColorAnimation>, CUIColorAnimation>
		{
		public:
			DECLARE_CLASS(CUIColorAnimation, ColorAnimation)

		public:
			CUIColorAnimation();
			virtual ~CUIColorAnimation();

		public:
			virtual void	OnTaskInit(CUIAnimationTimerData* pData);
			virtual BOOL	DoTimerTask();
			virtual void	ChangeColorProperty(UICOLOR value);

			virtual bool	CheckValid();
			virtual void	OnComplete();
			virtual void	OnParseAttribute(xml_attribute& attr, LPCTSTR lpAttrAlias);

		private:
			CUIAnimationTimerData* m_pTimerTaskData;
		};
	}
}

